{{include file="header_inc.html"}}
<script type="text/javascript">
<!--
	function edit(id, name) {
		window.top.art.dialog({
			id : 'edit'
		}).close();
		window.top.art.dialog({
			title : '修改《' + name + '》',
			id : 'edit',
			iframe : '/extend/copyfrom/edit/id/' + id + '/',
			width : '580',
			height : '240'
		}, function() {
			var d = window.top.art.dialog({
				id : 'edit'
			}).data.iframe;
			d.document.getElementById('dosubmit').click();
			return false;
		}, function() {
			window.top.art.dialog({
				id : 'edit'
			}).close()
		});
	}
	function data_delete(obj, id, name) {
		window.top.art.dialog({
			content : name,
			fixed : true,
			style : 'confirm',
			id : 'data_delete'
		}, function() {
			$.get('/extend/copyfrom/delete/id/' + id + '/', function(data) {
				if (data) {
					$(obj).parent().parent().fadeOut("slow");
				}
			})
		}, function() {
		});
	};
//-->
</script>
<body>
	<div class="subnav">
		<div class="content-menu ib-a blue line-x">
			<a class="add fb"
				href="javascript:window.top.art.dialog({id:'add',iframe:'/extend/copyfrom/add/', title:'添加来源', width:'580', height:'240', lock:true}, function(){var d = window.top.art.dialog({id:'add'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'add'}).close()});void(0);"><em>添加来源</em></a>
			<a href='javascript:;' class="on"><em>来源管理</em></a>
		</div>
	</div>
	<div class="pad-lr-10">
		<form name="myform" id="myform" action="/extend/copyfrom/listorder/"
			method="post">
			<div class="table-list">
				<table width="100%" cellspacing="0">
					<thead>
						<tr>
							<th width="55" align="center">排序</th>
							<th>来源名称</th>
							<th>来源链接</th>
							<th>来源logo</th>
							<th width="120">管理操作</th>
						</tr>
					</thead>
					<tbody>
						{{foreach item=content from=$Copyfrom_list}}
						<tr>
							<td align="center"><input type="text"
								name="listorders[{{$content.id}}]" value="{{$content.listorder}}" size="3"
								class='input-text-c'></td>
							<td align="center">{{$content.sitename}}</td>
							<td align="center">{{$content.siteurl}}</td>
							<td align="center"></td>
							<td align="center"><a
								href="javascript:edit('{{$content.id}}','{{$content.sitename}}')">修改</a>
								| <a href="javascript:;"
								onclick="data_delete(this,'{{$content.id}}','确认要删除 『 {{$content.sitename}} 』 吗？')">删除</a>
							</td>
						</tr>
						{{/foreach}}
					</tbody>
				</table>
				<div class="btn">
					<input type="submit" class="button" name="dosubmit" value="排序" />
				</div>
			</div>
			<div id="pages"></div>
		</form>
	</div>
</body>
{{include file="footer.html"}}
